<template>
<div class="layerRtb layerRtb-threecolumn">
    <three-title :title="{name:'人工'}"></three-title>
    <div class="layerRtb-scroll thinScroll" v-scrollHeight = "137">
        <div class="analyItem">
            <p class="analyItemTit tx-center">项目</p>
            <div class="analyItemCon">
                <p class="col-md-4">
                    <span class="cLightGray pr8">项目数量</span>
                    <span>{{wokerRing.orderNoCount}}</span>
                </p>
                <p class="col-md-4">
                    <span class="cLightGray pr8">分配数量</span>
                    <span>{{wokerRing.distributionCount}}</span>
                </p>
            </div>
        </div>
        <div class="analyItem">
            <p class="analyItemTit tx-center">订单</p>
            <div class="analyItemCon">
                <p class="col-md-4">
                    <span class="cLightGray pr8">工程量</span>
                    <span>{{wokerRing.craftCount}}</span>
                </p>
                <p class="col-md-4">
                    <span class="cLightGray pr8">已分配</span>
                    <span>{{wokerRing.distributionCraftCount}}</span>
                </p>
                <p class="col-md-4">
                    <span class="cLightGray pr8">分配人数</span>
                    <span>{{wokerRing.workerCount}}</span>
                </p>
                <p class="col-md-4">
                    <span class="cLightGray pr8">分配率</span>
                    <span>{{wokerRing.distributionRate}}%</span>
                </p>
            </div>
        </div>
        <div class="analyItem">
            <p class="analyItemTit tx-center">支款</p>
            <div class="analyItemCon">
                <p class="col-md-4">
                    <span class="cLightGray pr8">线上完成支款</span>
                    <span>0</span>
                </p>
            </div>
        </div>
    </div>
    <div class="layerRtb-footer">
        <div class="analyItem">
            <p class="analyItemTit tx-center">综合</p>
            <div class="analyItemCon">
                <p class="col-md-4">
                    <span class="cLightGray pr8">分配项目</span>
                    <span>{{wokerRing.distributionCount}}</span>
                </p>
                <p class="col-md-4">
                    <span class="cLightGray pr8">分配率</span>
                    <span>{{wokerRing.distributionRate}}%</span>
                </p>
            </div>
        </div>
    </div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { getCompletedEngineering } from '../../Resources/Api'
export default {
    data () {
        return {
            parmasExample: {
                name: '',
                age: ''
            },
            wokerRing: {} // 工人
        }
    },
    created () {
        this.getCompletedEngineering()// 工人
    },
    computed: {
        ...mapGetters(['userInfo', 'leftInfo'])
    },
    methods: {
        getCompletedEngineering () {
            getCompletedEngineering({
                areaId: this.leftInfo.u_diqu
            }).then(res => {
                if (res.data.StatusCode === 1) {
                    this.wokerRing = res.data.Body
                }
            }).catch(err => {
                console.log(err)
            })
        }
    }
}
</script>
